package com.jzo2o.foundations.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO;
import com.jzo2o.foundations.model.domain.Serve;
import com.jzo2o.foundations.model.domain.ServeSearch;
import com.jzo2o.foundations.model.dto.response.ServeResDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * \* User: chy
 * \* Date: 2025/9/24   15:17
 * \* Description:
 * \
 */
public interface RegionServeMapper  extends BaseMapper<Serve> {
    /**
     * 区域服务分页查询
     *
     * @param regionId
     * @return
     */
    List<ServeResDTO> serveList(Page<ServeResDTO> page,@Param("regionId") Long regionId);
    /**
     * 根据服务id查询服务信息
     * <p>
     * 用于添加到es中用
     *
     * @param serveId 服务id
     * @return 服务信息
     */
    ServeSearch getServeSearchByServeId(@Param("serveId") Long serveId);
    /**
     * 根据服务id查询服务详情   这个接口主要给订单服务使用
     * @param id
     * @return
     */
    ServeAggregationResDTO getServeById(Long id);
}
